package br.com.testes;

import br.com.vendas.HibernateUtil;
import org.hibernate.Session;

/**
 *
 * @author MCR11
 */
public class Conecta {
    public static void main(String[] args) {
        
        Session session = null;
        try {
            session = HibernateUtil.getSession().openSession();
            System.out.println("Conectou!");
        } finally{
            session.close();
            System.out.println("Fechou a conexão!");
        }
    }
            
}
